<?php
// +----------------------------------------------------------------------
// | Tplay [ WE ONLY DO WHAT IS NECESSARY ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017 http://tplay.pengyichen.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 听雨 < 389625819@qq.com >
// +----------------------------------------------------------------------

use think\Route;

//url美化 例：Route::rule('blog/:id','index/blog/read');
$url = \think\Db::name("urlconfig")->where(['status' => 1])->column('aliases,url');
foreach ($url as $k => $val) {
	\think\Route::rule($k,$val);
}
//api 路径配置
Route::domain('api','api');
Route::rule('apiindex','api/index/index');
Route::rule('apicity','api/index/city');
Route::rule('apiclassify','api/classify/index');
Route::rule('Token','api/Token/index','POST');
Route::rule('Tokenverification','api/base/Tokens','POST');
Route::rule('apicitygoods','api/goods/index','POST');
Route::rule('apigoodsdetails','api/goods/goodsdetails','POST');//商品
Route::rule('apipackage','api/goods/package','POST');//废弃
Route::rule('apicomment','api/Comment/index','POST');//评论
Route::rule('apidetails','api/poi/index','POST');//poi详情
Route::rule('apiclassifypoi','api/classify/classifypoi','POST');//导航下面的poi列表
Route::rule('apiCollection','api/Collection/indexpoi','POST');//收藏
Route::rule('apiCoupon','api/Coupon/index','POST');//优惠券
Route::rule('apiCouponreceive','api/Coupon/receive','POST');//优惠券领取
Route::rule('apiordergenerate','api/order/index','POST');//下订单
Route::rule('apiCouponfollowing','api/Coupon/following','POST');//优惠券领取
Route::rule('apiorderdetermine','api/order/determine','POST');//确认订单展示商品数据
Route::rule('apiordersubmit','api/order/submit','POST');//确认订单提交接口
Route::rule('apiwxpayindex','api/wxpay/index','POST');//微信支付接口1
Route::rule('apipay','api/PayController/dowxpay','POST');//微信支付接口2
Route::rule('Search','api/Search/index','POST');//搜索
Route::rule('searchpopular','api/Search/popular','POST');//微信支付接口2


Route::rule('apipindex','api/index/wxpindex');//小程序城市列表接口

//个人中心订单详情展示
Route::rule('orderdetail','api/KbxOrder/kbxorderdetail','POST');//订单详情
Route::rule('repeatorderdetail','api/KbxOrder/kbxRepeatOrderDetail','POST');//未支付订单详情


//FareHarbor接口
Route::rule('fareharbor/companies','api/Fareharbor/companies');//检索合作伙伴公司列表
Route::rule('fareharbor/items','api/Fareharbor/items');//检索合作伙伴公司的项目列表
Route::rule('fareharbor/date','api/Fareharbor/date');//检索项目的特定日期的可用性列表
Route::rule('fareharbor/daterange','api/Fareharbor/date_range');//检索项目的日期范围的可用性列表
Route::rule('fareharbor/prodetail','api/Fareharbor/prodetail');//检索特定可用性的详细信息
Route::rule('fareharbor/bookings','api/Fareharbor/bookings');//创建订单前的检查
Route::rule('fareharbor/validate','api/Fareharbor/bookings_validate');//创建预订示例
Route::rule('fareharbor/test','api/Fareharbor/test');//创建预订示例
//FareHarBor商品接口
Route::rule('faregoods/companies','api/FareGoods/companiesList');//获取合作商列表
Route::rule('faregoods/items','api/FareGoods/itemsList','POST');//获取某合作商的商品列表
Route::rule('faregoods/date','api/FareGoods/proListByDate','POST');//获取某商品的某日商品
Route::rule('faregoods/daterange','api/FareGoods/proListByDateRange','POST');//获取某商品的某时间区间商品
Route::rule('faregoods/prodetail','api/FareGoods/productdetail','POST');//获取某商品的具体详情
Route::rule('faregoods/updfaretable','api/FareGoods/updateFareGoodsTableData');//刷新faregoods表数据
Route::rule('faregoods/updfareprice','api/FareGoods/updFareAllGoodsPrice');//测试接口
Route::rule('faregoods/index','api/FareGoods/index');//测试接口
//通过code模糊查询产品列表
Route::rule('api/product/searchbycode','api/KbxOther/searchProductByCode');//通过code模糊查询产品列表
//拼团产品
Route::rule('api/grouptours/list','api/GroupToursLine/getGroupToursList');//拼团产品列表
Route::rule('api/grouptours/info','api/GroupToursLine/getGroupToursInfo');//拼团产品详情
Route::rule('api/grouptours/spec','api/GroupToursLine/getGroupSpecPrice');//拼团产品套餐价格
//标品接口（订单系统）
Route::rule('api/standard/list','api/Standard/getStandardList');//标品产品列表
Route::rule('api/standard/info','api/Standard/getStandardInfo');//标品产品详情
Route::rule('api/standard/specprice','api/Standard/getStandardSpecPrice');//标品产品套餐价格
Route::rule('api/standard/roomprice','api/Standard/getStandardRoomPrice');//标品产品酒店价格
Route::rule('api/standard/spectime','api/Standard/getStandardSpecTimeList');//标品产品酒店价格

Route::domain('wap','wap');
Route::rule('wapindex','wap/index/index','GET');//wap端首页
Route::rule('wapgoods','wap/goods/index','POST');//wap商品列表
Route::rule('wapclassify','wap/classify/index','GET');//wap分类
Route::rule('wapcollection','wap/Collection/index','POST');//wap商品收藏
Route::rule('wapgoodsdetails','wap/goods/details','POST');//wap商品购买页
Route::rule('wapcouponindex','wap/goods/coupon','GET');//wap优惠券查询
Route::rule('wapcouponreceive','wap/Coupon/receive','POST');//wap优惠券领取
Route::rule('wapcouponfollowing','wap/Coupon/following','POST');//wap查询商品下面可用的优惠券
Route::rule('wapcity','wap/index/city','GET');//目的地
Route::rule('wapgoodspackage','wap/goods/package','POST');//wap商品详情
Route::rule('waporderindex','wap/order/index','POST');//wap订单
Route::rule('waporderdetermine','wap/order/determine','POST');//wap查询商品下面可用的商品
Route::rule('wapordersubmit','wap/order/submit','POST');//wap查询商品下面可用的商品
Route::rule('wapcouponreceive','wap/Coupon/receive','POST');//wap查询商品下面可用的商品
Route::rule('wapcomment','wap/Comment/index','POST');//wap更多评论
Route::rule('wapsearch','wap/Search/index','POST');//搜索
Route::rule('channel','wap/Realname/channel','POST');//实名转账渠道
Route::rule('realname','wap/Realname/real','POST');//实名添加
Route::rule('realedit','wap/Realname/realedit','POST');//实名修改
Route::rule('profit','wap/Realname/profit','POST');//我的收益
Route::rule('rutforward','wap/Realname/rutforward','POST');//提现申请
Route::rule('income','wap/Realname/income','POST');//累计收益
Route::rule('record','wap/Realname/record','POST');//累计收益
Route::rule('authorization','wap/index2/index','GET');//授权
Route::rule('wxpay','wap/Wxpay/pay1','POST');//授权
Route::rule('wapcustomorigin','wap/Custom/origin','POST');//定制 出发地 已更改为用户自己填写,暂废弃
Route::rule('wapcustomdestination','wap/Custom/destination','POST');//定制 目的地
Route::rule('wapcustomcustom','wap/Custom/custom','POST');//定制 服务
Route::rule('wapcustomindex','wap/Custom/index','POST');//定制 提交定制数据
Route::rule('waporderdiscount','wap/Coupon/getCoupon','POST');//下单领券 分享后相关操作
Route::rule('waporderdiscountuser','wap/Coupon/getCouponUser','POST');//下单领券 个人中心-优惠券领取
Route::rule('wapregistercoupon','wap/Coupon/sendCoupon','POST');//评价领券
Route::rule('wapcouponlist','wap/Coupon/listCoupon','POST');//分享领券进度列表


//非拉领取红包
Route::rule('flgetcoupon','wap/Coupon/flGetCoupon','POST');


//夏季红包领取接口
Route::rule('GetSummerCoupon','wap/Coupon/GetSummerCoupon','POST');



Route::rule('wapinterval','wap/Goods/interval','POST');//套餐日历
Route::rule('wapspec_person','wap/Goods/spec_person','POST');//套餐日历



//天气请求接口
Route::rule('wapweather','wap/Weather/city_query','POST');//天气请求接口

//wap文章部分
Route::rule('waparticle','wap/Article/index','POST');//文章列表 OR 搜索
Route::rule('wapclass','wap/Article/frticleclass','POST');//文章分类
Route::rule('wapfabulous','wap/Article/fabulous','POST');//文章点赞
Route::rule('wapdetails','wap/Article/details','POST');//文章详情
Route::rule('waparticlecomment','wap/Article/comment','POST');//文章品论
Route::rule('wapaddcomment','wap/Article/addcomment','POST');//新增品论

//行程部分
Route::rule('waptripcdk','wap/Trip/cdk','POST');//检查行程是否存在
Route::rule('waptripindex','wap/Trip/index','POST');//获取行程信息
Route::rule('waptrippoi','wap/Trip/poi','POST');//获取行程中的poi

//计算价格部分
Route::rule('kbxcoupon','wap/Kbxcoupon/coupon');//领取优惠券
Route::rule('price','wap/order/price');//使用优惠券
Route::rule('refund','wap/order/refund');//使用优惠券




//首页改版API
Route::rule('hotgoods','wap/goods/hotgoods','POST');//爆款商品列表
Route::rule('currentcitygoods','wap/goods/currentcitygoods','POST');//当前城市下商品列表
Route::rule('seasongoods','wap/goods/seasongoods','POST');//当季商品列表


Route::rule('getthemegoods','wap/goods/getthemegoods','POST');//主题商品列表
Route::rule('gethomearticle','wap/article/gethomearticle','POST');//获取首页推荐攻略

//WAP拼团产品
Route::rule('grouptourslist','wap/Grouptoursline/getGroupToursList');//拼团产品列表
Route::rule('grouptoursinfo','wap/Grouptoursline/getGroupToursInfo');//拼团产品详情
Route::rule('recgrouptours','wap/Grouptoursline/getRecommendGroupTours');//推荐拼团产品
Route::rule('grouptours/addcustomer','wap/Grouptoursline/addCustomerToOrder');//下单拼团产品


//标品接口
Route::rule('standardprolist','api/Standard/getStandardListToB');//标品产品列表
Route::rule('standardproinfo','api/Standard/getStandardInfoToB');//标品产品详情
Route::rule('searchstandardprolistbyes','api/Standard/searchStandardListByES');//标品ES搜索
Route::rule('getcitybysearches','api/Standard/getCityListByKeywordES');//标品ES搜索获取城市列表
Route::rule('standardtagstypelist','api/Standard/getStandardTagsTypeListToB');//标品标签分类列表
Route::rule('standardtagslist','api/Standard/getStandardTagsListToB');//标品标签列表
Route::rule('standardcitylist','api/Standard/getStandardCityList');//标品标签列表
//商品接口
Route::rule('standardgoodslist','api/Standard/getGoodsListToB');//标品商品列表
Route::rule('standardgoodsinfo','api/Standard/getGoodsInfoToB');//标品商品详情
Route::rule('standardgoodsspecs','api/Standard/getGoodsSpecsToB');//标品商品套餐日历
Route::rule('standardgoodsspecsinfo','api/Standard/getGoodsSpecsInfoToB');//标品商品套餐详情
//测试
Route::rule('getordertoken','api/KbxToken/kbxToken');//获取订单系统的token

//拼游小程序接口
Route::rule('wxsoft/grouptourlist','api/GroupToursWxSoft/getList');//拼游产品列表
Route::rule('wxsoft/recgrouplist','api/GroupToursWxSoft/getRecGroupList');//拼游产品推荐团期列表
Route::rule('wxsoft/grouptourinfo','api/GroupToursWxSoft/getDetail');//拼游产品详情
Route::rule('wxsoft/groupinfo','api/GroupToursWxSoft/getGroupDetail');//拼游产品详情
Route::rule('wxsoft/grouptourorder','api/GroupToursWxSoft/order');//拼游产品报名
Route::rule('wxsoft/grouptourorderlist','api/GroupToursWxSoft/orderList');//拼游订单列表
Route::rule('wxsoft/grouptourorderinfo','api/GroupToursWxSoft/orderDetail');//拼游订单列表
Route::rule('wxsoft/grouptourdelorder','api/GroupToursWxSoft/delOrder');//删除拼游订单列表
Route::rule('wxsoft/pqrcode','api/Unionid/getPromotionQrcode');//获取产品的推广二维码【产品ID+memberID】
Route::rule('wxsoft/proqrcode','api/Unionid/getProductPromotionQrcode');//获取产品的推广二维码【产品ID】
Route::rule('wxsoft/gqrcode','api/GroupToursWxSoft/getGroupQrcode');//获取产品的群组二维码
Route::rule('wxsoft/isBusy','api/GroupToursWxSoft/getBusySeasonByDate');//判断日期属于淡旺季
//拼游小程序 自由行
Route::rule('wxsoft/freegrouplinelist','api/GroupToursWxSoft/freeGroupLineList');//自由行关联产品列表
Route::rule('wxsoft/freegrouplist','api/GroupToursWxSoft/freeGroupList');//自由行列表
Route::rule('wxsoft/freegroupinfo','api/GroupToursWxSoft/freeGroupInfo');//自由行详情
Route::rule('wxsoft/createfree','api/GroupToursWxSoft/createFreeGroup');//发起自由行
Route::rule('wxsoft/joinfree','api/GroupToursWxSoft/joinFreeGroup');//加入自由行
Route::rule('wxsoft/outfree','api/GroupToursWxSoft/outFreeGroup');//退出自由行
Route::rule('wxsoft/myfreegroup','api/GroupToursWxSoft/freeGroupListByMemberId');//退出自由行
Route::rule('wxsoft/citylist','api/GroupToursWxSoft/getFreeGroupCityList');//获取城市列表
Route::rule('wxsoft/feedback','api/GroupToursWxSoft/createGrouptourFeedback');//提交反馈意见
//个人信息
Route::rule('wxsoft/user','api/GroupToursWxSoft/userInfo');//拼游个人中心
Route::rule('wxsoft/userprofit','api/GroupToursWxSoft/userProfit');//获取我的收益
Route::rule('wxsoft/integral','api/GroupToursWxSoft/integralList');//拼游积分列表
Route::rule('wxsoft/profit','api/GroupToursWxSoft/profitList');//拼游收益列表
Route::rule('wxsoft/applycashout','api/GroupToursWxSoft/applyCashOut');//申请提现
Route::rule('wxsoft/realauth','api/GroupToursWxSoft/realAuth');//实名认证
Route::rule('wxsoft/channel','api/GroupToursWxSoft/channel');//获取收款渠道
Route::rule('wxsoft/record','api/GroupToursWxSoft/record');//提现列表

//同步驴迹产品接口
Route::rule('pushLvjiProduct','api/lvji_api/pushProductMsg');

return [
    '__pattern__' => [
        'name' => '\w+',
    ],
    '[hello]'     => [
        ':id'   => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
        ':name' => ['index/hello', ['method' => 'post']],
    ],

];


